#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
#include <string.h>

int main()
{
    char str[10001], sep[45] = "!@#$%^&*()_+{}:<>?~1234567890`-=[];',./\\| ";
    char* pstr[300];
    char* psep = &sep;
    int i = 0;
    scanf("%[^\n]%*c", str);
    for (pstr[i] = strtok(str, psep); pstr[i] != NULL; pstr[++i] = strtok(NULL, psep));
    for (i -= 1; i >= 0; i--)
    {
        for (int j = 0; pstr[i][j] != '\0'; j++)
            putchar(pstr[i][j]);
        if (i)
            printf(" ");
    }
    return 0;
}